package cz.myslivec.slovicka.xml.model;

import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name="vocablesDB")
public class VocablesDbDTO {

	private List<LessonDTO> lessons;
	private List<TestedVocableDTO> testedVocables;
	
	public VocablesDbDTO() {
		super();
	}

	public VocablesDbDTO(List<LessonDTO> lessons, List<TestedVocableDTO> testedVocables) {
		super();
		this.lessons = lessons;
		this.testedVocables = testedVocables;
	}

	public List<LessonDTO> getLessons() {
		return lessons;
	}

	public void setLessons(List<LessonDTO> lessons) {
		this.lessons = lessons;
	}

	public List<TestedVocableDTO> getTestedVocables() {
		return testedVocables;
	}

	public void setTestedVocables(List<TestedVocableDTO> testedVocables) {
		this.testedVocables = testedVocables;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((lessons == null) ? 0 : lessons.hashCode());
		result = prime * result
				+ ((testedVocables == null) ? 0 : testedVocables.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		VocablesDbDTO other = (VocablesDbDTO) obj;
		if (lessons == null) {
			if (other.lessons != null)
				return false;
		} else if (!lessons.equals(other.lessons))
			return false;
		if (testedVocables == null) {
			if (other.testedVocables != null)
				return false;
		} else if (!testedVocables.equals(other.testedVocables))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "VocablesDbDTO [lessons=" + lessons + ", testedVocables="
				+ testedVocables + "]";
	}
}
